function sbmtSrch(kCtlId, OCtlId, rpUrl)
{
    
    var k = document.forms[0].elements[kCtlId].value;
    k = k.replace( /\s*$/, '' );
    if(k == ''){
        alert('Please enter one or more search words.');
        if(null != event){
            event.returnValue = false;
            return false;
        }
        else return;
    }                               
    var sch = '?k=' + encodeURIComponent(k);

    if(OCtlId != '')
    {
    
        var oCtl = document.forms[0].elements[OCtlId];
        var selVal ='', selTxt='';
        var frmu,frmn;
        selVal = oCtl.options[oCtl.selectedIndex].value;
        selTxt = oCtl.options[oCtl.selectedIndex].text;
       if (selVal == 'This Site')
        {
            frmu = document.forms[0].elements['This Siteu'];
            frmn = document.forms[0].elements['This Siten'];
            if (null != frmu && null!=frmn)
                sch += '&cs=This Site&u=' + encodeURIComponent(frmu.value) + '&n=' + encodeURIComponent(frmn.value);
        
        }
        else if (selVal == 'This List')
        {
      
            frmu = document.forms[0].elements['This Listu'];
            frmn = document.forms[0].elements['This Listn'];
            if (null != frmu && null!=frmn)
                sch += '&cs=This List&u=' + encodeURIComponent(frmu.value) + '&n=' + encodeURIComponent(frmn.value);
        }
        else if (selVal == '')
        {
       
            sch += "&s=" + encodeURIComponent(selTxt);
        }
        else
        {
      
             sch += "&s=" + encodeURIComponent(selTxt);
             rpUrl = selVal;
        
        }
    
    }

 var F=document.forms[0];
 try {external.AutoCompleteSaveForm(F);} catch (err) {}

    window.location = rpUrl + sch;

    try {if(null    != event) event.returnValue = false;} catch (err) {}
    return; 

}
